package com.neegix.system.role.infrastructure.repository.convert;

import com.neegix.system.role.application.dto.RoleDTO;
import com.neegix.system.role.application.dto.RoleMenuDTO;
import com.neegix.system.role.domain.entity.RoleEntity;
import com.neegix.system.role.domain.entity.RoleMenuEntity;
import com.neegix.system.role.infrastructure.repository.dataobject.RoleDO;
import com.neegix.system.role.infrastructure.repository.dataobject.RoleMenuRelDO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

 /**
  * This file is auto-generated by nebula-framework-generator.
  * The auto-generation plugin was developed using IntelliJ IDEA Community Edition.
  * Thanks to JetBrains for their outstanding contributions to the developer community.
  * <p>
  * The code generated by this tool is owned by the user of the tool.
  * The tool itself is copyrighted by <a href="https://www.neegix.com">https://www.neegix.com</a>.
  *
  * @author <a href="https://www.neegix.com">https://www.neegix.com</a>
  * @version 1.0.0
  * @since 2024-11-25 11:32:40
  */

@Mapper
public interface RoleConverter {
    RoleConverter INSTANCE = Mappers.getMapper(RoleConverter.class);

    RoleDO covertDO(RoleEntity roleEntity);

    @Mapping(target = "startCreateTime", ignore = true)
    @Mapping(target = "startUpdateTime", ignore = true)
    @Mapping(target = "endCreateTime", ignore = true)
    @Mapping(target = "endUpdateTime", ignore = true)
    RoleDTO covertDTO(RoleDO roleDO);

    @Mapping(target = "startCreateTime", ignore = true)
    @Mapping(target = "startUpdateTime", ignore = true)
    @Mapping(target = "endCreateTime", ignore = true)
    @Mapping(target = "endUpdateTime", ignore = true)
    List<RoleDTO> covertDTOS(List<RoleDO> roleDOS);

    List<RoleMenuRelDO> covertDO(List<RoleMenuEntity> roleMenuEntities);

     List<RoleMenuDTO> covertDTO(List<RoleMenuRelDO> roleMenuRelDOS);
}